import {
   get,
   post
} from './index'

// 0---------------------setshop-----------------------0//

// 获取列表
export let menulist = params => get('/menulist', params)
// 添加商品
export let menuadd = data => post('/menuadd', data)
// 删除商品
export let menudelete = data => post('/menudelete', data)
// 获取一条数据
export let menuinfo = data => get('/menuinfo', data)
// 修改一条数据
export let menuedit = data => post('/menuedit', data)

// 0---------------------setpeople-----------------------0//

// 添加角色
export let roleadd = data => post('/roleadd', data)
// 角色列表
export let rolelist = params => get('/rolelist', params)
// 获取一条角色信息
export let roleinfo = params => get('/roleinfo', params)
// 角色修改
export let roleedit = data => post('/roleedit', data)
// 角色删除
export let roledelete = data => post('/roledelete', data)

// 0---------------------setmange-----------------------0//

// 添加管理员
export let useradd =data=>post('/useradd',data)
// 管理员总数
export let usercount = params => get('/usercount',params)
// 管理员列表
export let userlist = params => get('/userlist',params)
// 获取一个一个管理员
export let userinfo = params => get('/userinfo',params)
// 管理员修改
export let useredit=data =>post('/useredit',data)
// 管理员删除
export let userdelete =data=>post('/userdelete',data)
// 管理员登录
export let userlogin=data=>post('/userlogin',data)

// 0---------------------toshop-----------------------0//

// 添加商品分类
export let cateadd = data =>post('/cateadd',data,true)
// 商品分类列表
export let catelist = params =>get('/catelist',params)
// 获取一条商品分类
export let cateinfo = params =>get('/cateinfo',params)
// 商品分类修改
export let cateedit = data =>post('/cateedit',data,true)
// 商品分类删除
export let catedelete = data =>post('/catedelete',data)

// 0---------------------tobanner-----------------------0//

// 添加一个轮播图
export let banneradd = data =>post('/banneradd',data,true)
// 轮播图列表
export let bannerlist = params =>get('/bannerlist',params)
// 获取一条数据
export let bannerinfo =params =>get('/bannerinfo',params)
// 轮播图修改
export let banneredit =data =>post('/banneredit',data,true)
// 轮播图删除
export let bannerdelete =data =>post('/bannerdelete',data)

// 0---------------------tospecs-----------------------0//

// 规格添加
export let specsadd = data =>post ('/specsadd',data)
// 商品规格总数
export let specscount = params =>get ('/specscount',params)
// 商品规格列表（分页）
export let specslist = params =>get ('/specslist',params)
// 商品规格获取（一条）
export let specsinfo = params =>get ('/specsinfo',params)
// 商品规格修改
export let specsedit = data =>post ('/specsedit',data)
// 商品规格删除
export let specsdelete = data=>post('/specsdelete',data)

// 0---------------------setgoods-----------------------0//
// 规格添加
export let goodsadd = data =>post ('/goodsadd',data,true)
// 商品规格总数
export let goodscount = params =>get ('/goodscount',params)
// 商品规格列表（分页）
export let goodslist = params =>get ('/goodslist',params)
// 商品规格获取（一条）
export let goodsinfo = params =>get ('/goodsinfo',params,true)
// 商品规格修改
export let goodsedit = data =>post ('/goodsedit',data,true)
// 商品规格删除
export let goodsdelete = data=>post('/goodsdelete',data)

// 0---------------------touser-----------------------0//

//获取会员列表
export let memberlist = params =>get('/memberlist',params)
// 获取一条会员数据
export let memberinfo = params =>get('/memberinfo',params)
// 修改会员列表
export let memberedit =data =>post('/memberedit',data)


// 0---------------------toseck-----------------------0//

//1.限时秒杀添加** 
export let seckadd =data =>post('/seckadd',data)
//2.限时秒杀列表** 
export let secklist=params=>get('/secklist',params)
//3.限时秒杀获取（一条）
export let seckinfo=params=>get('/seckinfo',params)
//限时秒杀修改
export let seckedit=data=>post ('/seckedit',data)
// 限时秒杀删除
export let seckdelete=data=>post('/seckdelete',data)